package WrittenTest;

import java.util.Scanner;

public class test25 {
    // 给定一个数 x，求出离 x最近的可以开平方的数
    // 算法原理：枚举
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long x = in.nextLong(), right = x + 1;
        long tmp = (long) Math.sqrt(x), pre;
        // 枚举大于x可以开平方的数
        while (true) {
            pre = (long) Math.sqrt(right);
            if (pre * pre != tmp * tmp) {
                break;
            }
            right++;
        }
        // 判断差值
        if (Math.abs(tmp * tmp - x) > Math.abs(pre * pre - x)) {
            System.out.println(pre * pre);
        } else {
            System.out.println(tmp * tmp);
        }
    }
}
